﻿using System;
using System.IO;
using System.Net;
using System.Windows;
using System.Windows.Input;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Navigation;

using NetExp.MediaXenter.Database;
using NetExp.MediaXenter.Utilities;

namespace MediaXenterWPF.UserControl.Impostazioni
{
    public partial class ImpostazioniVideo
    {
        private SettingsDS _settingsDS = null;
        private KeyboardManager _keyboardManager;
        private ThemesResources _themesResources;
        private StyleHelper _styleHelper;
        private double _width;
        private double _height;
        public ImpostazioniVideo(SettingsDS settingsDS, KeyboardManager keyboardManager, ThemesResources themesResources, StyleHelper styleHelper, double width, double height)
        {
            this.InitializeComponent();

            _settingsDS = settingsDS;
            _keyboardManager = keyboardManager;
            _themesResources = themesResources;
            _styleHelper = styleHelper;

            _width = width;
            _height = height;
            btnCartelle.Content = LocalizationHelper.TranslateString(_settingsDS, btnCartelle.Content.ToString());
            btnCodec.Content = LocalizationHelper.TranslateString(_settingsDS, btnCodec.Content.ToString());
        }

        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            
        }

        internal void SetDimension(double width, double height)
        {
            brdContenitore.Width = width;
            brdContenitore.Height = height;
            brdLaterale.Width = width - brdFunzioni.ActualWidth;
            //brdFunzioni.Width = width - brdDati.ActualWidth;
            //brdFunzioni.Height = height;
        }

        internal void SetSelection()
        {
            btnCartelle.Style = (Style)FindResource("MediaButtonSelected");
        }

        public void AnimazionePulsanti(Key pulsante)
        {
            if (btnCartelle.Style == (Style)FindResource("MediaButtonSelected"))
            {
                btnCartelle.Style = (Style)FindResource("MediaButton");
                btnCodec.Style = (Style)FindResource("MediaButtonSelected");
            }
            else
            {
                btnCodec.Style = (Style)FindResource("MediaButton");
                btnCartelle.Style = (Style)FindResource("MediaButtonSelected");
            }

        }

    }
}